package com.seckill.exception;

import com.seckill.result.CodeMsg;

/**
 * 全局异常类
 * @author yjw
 */
public class GlobalException extends RuntimeException{

	private static final long serialVersionUID = 1L;

	/**
	 * 异常信息（搭配返回值）
	 */
	private final CodeMsg cm;
	
	public GlobalException(CodeMsg cm) {
		super(cm.toString());
		this.cm = cm;
	}

	public CodeMsg getCm() {
		return cm;
	}

}
